package net.huashitong.supervision.gongjian.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;
import net.huashitong.supervision.gongjian.dao.GjLeaderProjectDao;
import net.huashitong.supervision.gongjian.entity.GjLeaderProject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GjLeaderProjectService extends StringPKService<GjLeaderProject> {
    @Autowired
    private GjLeaderProjectDao dao;
    @Autowired
    private SysTableService tableService;

    @Override
    protected BaseDao<GjLeaderProject, String> getDao() {
        return dao;
    }

    @Override
    protected void beforeSave(GjLeaderProject obj) {
        String sysId = tableService.updateMaxSysId("t_gj_leader_project", "");
        obj.setSysId(sysId);
    }


}
